perm filename BAIL.UPD[DOC,AIL] blob
sn#206175 filedate 1976-03-13 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 Changes since original printing of BAIL manual AIM-270
C00010 ENDMK
C⊗;
Changes since original printing of BAIL manual AIM-270
BAIL ver. 12-Mar-76
Locations specified to BREAK using block names may now use only "."
(period) for the delimiter; e.g., BREAK("block.proc");.
.SS COORD
INTEGER PROCEDURE COORD(STRING LOCATION);
Returns the coordinate number of the location given as its argument.
LOCATION has the same syntax as in BREAK.
.SS DEFINE
PROCEDURE DEFINE(char,"macro");
Macros from the source file(s) are not recognized at the present
time. There are 26 character macros definable, from "A" to "Z".
DEFINE macros substitute the given string for each occurrance of
<alt><char> which is not part of a string constant. If the operating
system can send characters of more than 7 bits to INCHWL (INTTY under
TENEX) then any activation character with high order bits will also
activate the macro. Thus at Stanford <alt>P, αP, and αβP are all
equivalent. In all cases the character is converted to upper case
before doing anything else. The macros G, P, S, and X are predefined
to be " !!GO;", " !!GO;", " !!STEP;", and " !!GSTEP;" respectively.
.SS BLOCK STRUCTURE
Variables not in the current scope can be referenced by using the
same scheme used to describe locations to BREAK. If you have
something of your own named SHOW then you can access the BAIL SHOW
function by using $RUN$.SHOW(coord);. Warning: this mode assumes
that you know what you are doing.
.SS BAIL and DDT
When BAIL is loaded by a non-TENEX system, it sets .JBDDT to the
address of one of its routines. (The routine is B. referred to in
AIM-270. If you load both BAIL and DDT, then the last module loaded
wins.) Under TENEX, BAIL sets .JBDDT only if it is zero when BAIL
looks.
.SS FOR WIZARDS ONLY
pseudoPROCEDURE !!GOTO("location");
The return address is set to the location specified, and then a !!GO
is done. Note that the location should be in the same lexical scope
as the most recent entry to BAIL, or the program will probably get
confused.
pseudoPROCEDURE !!UP(level);
This procedure trims the runtime stack back to level, then reenters
BAIL. CLEANUPs and deallocations are performed for the procedures
thus killed. Level has the same interpretation as in SETLEX, and in
addition must not designate a SIMPLE procedure. Suppose you ask BAIL
to evaluate a procedure call, the procedure hits an error, and you
want to get back to where you were before the procedure was called.
Then !!UP will do the trick if the value of level is correct.
INTERNAL STRING !!QUERY; [Declare as EXTERNAL in your program.]
Whenever BAIL wants input, it checks this string first. If it is not
NULL, then !!QUERY is used instead of asking the operating system for
input from the terminal. (!!QUERY is set to NULL each time this is
done.) Thus a program can simulate the effect of typing to its own
input buffer by stuffing the text into !!QUERY. In particular, file
input to BAIL and various macro hacks can be effected by using
procedures which assign values to !!QUERY.
PROCEDURE SETSCOPE(ITEMVAR PITEM);
If you have processes, then SETSCOPE can be used to peek around the
world. Specifically, the static and dynamic scopes are set to those
of the process for which PITEM is the process item. This will allow
access to variables and traceback from TEXT, but care must be
exercised when calling procedures. A call to a procedure which is
not defined at the top level will probably not work. Also, if the
procedure does not return successfully then your stacks will be
hopelessly confused.
Note on processes: BAIL runs in the process which caused the break.
Thus stack space must be provided in each process. The minimum
amount is PSTACK(4)+STRINGSTACK(2).
.SS OTHER PROCESSORS
BAIL and other language processors: If procedures are compiled by
some processor other than SAIL (e.g. FAIL, MACRO, BLISS, ...) then
further steps must be taken if BAIL is to know about them. BAIL must
have access to a procedure descriptor in order to call any procedure
(cf. the /4B switch). Thus a user who wishes to use assembly
language procedures with BAIL must provide appropriate procedure
descriptors. The file SAILPD.FAI[S,AIL] defines a FAIL macro which
will generate a SAIL procedure descriptor. The procedure descriptors
may reside in a separate load module if desired; but they must be in
the core image when BAIL is being used.